﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using System.Collections;
using WCF_BI_Portal.GeneralLibs;
using System.Data;
using System.Data.SqlClient;
using System.Xml;
//using WCF_BI_Portal.Lists;
using System.IO;
using System.Runtime.Serialization;

namespace WCF_BI_Portal
{
    // NOTE: If you change the interface name "IService1" here, you must also update the reference to "IService1" in Web.config.
    [ServiceContract]
    public interface IBIPortal
    {
        [OperationContract]
        [FaultContract(typeof(CustomFaultMsg))]
        string ThongTinTongTheOut(string dbName, DateTime thoiDiemDau, DateTime thoiDiemCuoi, bool tinhCongNo);

        [OperationContract]
        [FaultContract(typeof(CustomFaultMsg))]
        DateTime GetThoiDiemKhoaSoGanNhatOut(string dbName, DateTime thoiDiem);

        [OperationContract]
        [FaultContract(typeof(CustomFaultMsg))]
        string DoanhSoLaiLoTheoTungChiNhanh(string dbName, DateTime thoiDiemDau, DateTime thoiDiemCuoi, int numInterval);

        [OperationContract]
        [FaultContract(typeof(CustomFaultMsg))]
        string BienDongCongNoTienMatHangHoa(string dbName, DateTime thoiDiemDau, DateTime thoiDiemCuoi, int numInterval);

        [OperationContract]
        [FaultContract(typeof(CustomFaultMsg))]
        string DoanhSoLaiLoCacChiNhanh(string[] dbNames, DateTime thoiDiemDau, DateTime thoiDiemCuoi);

        [OperationContract]
        [FaultContract(typeof(CustomFaultMsg))]
        string UserLogin(string dbName, string userName, string password);

        [OperationContract]
        [FaultContract(typeof(CustomFaultMsg))]
        string GetDataBaseList(string dbName, string userName);

        [OperationContract]
        [FaultContract(typeof(CustomFaultMsg))]
        string BienDongDoanhSoBanHang(string dbName);

        [OperationContract]
        [FaultContract(typeof(CustomFaultMsg))]
        List<decimal[]> TyLeLoiNhuanSoVoiTongVonDauTu(string[] dbName, DateTime thoiDiemDau, DateTime thoiDiemCuoi);
    }

    [DataContract]
    public class CustomFaultMsg
    {
        [DataMember]
        public string Message { get; set; }
    }
}